package com.tdd.api.server.base.returns;

/**
 * @author: wangkai59
 * @Description:错误码
 */
public enum RespCode {

    /**
     * 错误码枚举
     */
    SUCCESS(200, "成功"),
    ACCESS_TOKEN_CHANGED_ERROR(21040, "檢測到您的賬號在其他設備登錄，請註意您的賬號安全。如非您本人操作，建議您盡快修改賬號密碼"),

    USER_NOT_EXIST(20000, "用戶不存在！"),
    USER_NOT_LOGIN(20001, "用戶未登錄"),
    CAPTCHA_INCORRECT(20004, "驗證碼錯誤"),
    CAPTCHA_EMPTY(20005, "驗證碼為空"),
    CAPTCHA_TIME_OUT(20005, "驗證碼超時"),
    REQUEST_PATH_NOT_FOUND(20006, "請求路徑未找到"),
    REQUEST_METHOD_ERROR(20007, "請求方法錯誤"),

    REGISTER_ERROR(20100, "註冊失敗，請重試！"),
    REGISTER_EXIST_PHONE_ERROR(20101, "手機號已被注册！"),
    REGISTER_EXIST_USERNAME_ERROR(20102, "該賬號已註冊！請直接登錄。"),
    SEND_MSG_ERROR(20103, "註冊失敗，請重試！"),
    INVITER_PHONE_ERROR(20104, "邀請人人手機號錯誤，請確認後重試！"),

    REGISTER_V_CODE_ERROR(20110, "短信驗證碼錯誤！"),
    REGISTER_V_CODE_OVERDUE(20111, "短信驗證碼已超期！"),
    SEND_CODE_ERROR(20112, "短信驗證碼發送失敗！"),

    REGISTER_INVITE_PHONE_ERROR(20120, "邀請手機號錯誤！請重新填寫"),

    CHANGE_PHONE_ERROR(20401, "修改手機號失敗，無驗證用戶信息！"),
    UPLOAD_FILE_ERROR(20501, "文件上傳失敗"),

    LOGIN_NOT_USER(30001,"用戶未註冊，請先註冊！"),
    LOGIN_PWD_ERROR(30002,"密碼錯誤，請重試！"),
    LOGIN_NOT_PERMITTED(30004,"該用戶沒有登錄權限"),
    PARAMETERS_ERROR(30005, "參數非法或格式有誤"),
    PARAMETERS_NULL(30006, "參數不能為空"),
    NOT_FOUND(30008,"數據不存在"),
    OBJECT_NOT_EXISTED(30010,"對象不存在"),
    USER_QR_ERROR(30011,"用戶二維碼錯誤，請重新掃碼！"),
    USER_QR_TIMEOUT(30011,"用戶二維碼超時！請刷新二維碼後重新掃碼！"),

    CARD_ERROR(30101,"會員卡識別失敗！"),
    CARD_EXIST(30102,"會員卡不存在！"),
    CARD_PHONE_EXIST(30103,"會員卡未綁定手機號！"),
    CARD_PHONE_BONDING(30104,"會員卡已綁定！"),
    CARD_LOCK(30105,"會員卡已被鎖定，請聯繫管理員！"),
    DEVICE_NULL(40100,"站點不存在！"),


    PLATE_NUMBER_BINDING_EXISTED(40400,"該車牌已經綁定！"),

    USE_NUMBER_DEFICIENCY(40500,"洗車次數不足！"),
    WASH_TYPE_ERROR(40501,"洗車类型不正确！"),

    INTEGRAL_INFO_NO_EXIST(40700,"積分兌換產品不存在！"),
    INTEGRAL_DEFICIENCY(40701,"可用兌換積分不足！"),
    GOODS_DELETION(40702,"兑换商品数量不足！"),
    GOODS_EXP_NULL(40703,"請填寫完整的收貨地址信息！"),
    GOODS_EXCHANGE_NO_EXIST(40704,"兌換記錄不存在！"),

    STORE_INFO_NO_EXIST(40800,"儲值產品不存在！"),

    STORE_CARD_NO_EXIST(40801,"會員卡異常！"),

    ORDER_NO_EXIST(40801,"儲值订单不存在！"),
    ORDER_PAYED(40802,"儲值订单已支付！"),

    GIVE_PHONE_NO_EXIST(40900,"赠送手机号未注册！"),
    GIVE_NUMBER_NO_EXIST(40901,"赠送次数不足！"),
    GIVE_NUMBER_IS_ZERO(40902,"赠送次数不足！"),


    GAME_NO_ORDER(41001,"暫無洗車訂單！"),
    WASHING_NO_ORDER(41002,"暫無进行中的洗車訂單！"),
    WASHING_ON_ORDER(41003,"已有洗車訂單！請勿重複掃碼！"),
    ORDER_NO_WAITING(41004,"訂單已開始或已取消！"),
    ORDER_DONE(41005,"訂單已完成或已取消！"),

    CANCEL_ORDER1(41003,"取消訂單失敗，訂單已開始！"),
    CANCEL_ORDER2(41004,"取消訂單失敗，訂單已完成！"),

    INVOICE_TITLE_NO_EXIST(41101,"發票抬頭信息不存在！"),
    INVOICE_ORDER_NO_EXIST(41102,"請選擇需要開具發票的儲值訂單！"),

    INVOICE_AMOUNT_DEFICIENCY(41103,"開具發票金額不足！"),

    INVOICE_ITEMS_EXCEED(41104,"一次最多支持200條儲值訂單！"),

    INVOICE_ERROR(41105,"開具發票失敗，請稍後在試！"),

    DEVICE_OFF_LINE(40101,"設備已離線！"),
    DEVICE_INSTRUCT_LINE(40102,"指令錯誤！"),
    SERVER_ERROR(50000, "服務器錯誤"),


    UNDEFINED_ERROR(99999,"未定義錯誤類型"),
    ;

    private final Integer code;
    private String message;

    private RespCode(Integer code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public Integer getCode()
    {
        return code;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message){
        this.message = message;
    }
}
